package com.permission_demo.listener;

import com.permission_demo.handler.PermissionBeanPostProcessor;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class ApplicationStaredListener implements ApplicationListener<ApplicationReadyEvent> {
    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        System.out.println("启动完成");
        // 可以在此处维护系统中新增/删除的权限点，和数据库permission表中数据对比，
        System.out.println(PermissionBeanPostProcessor.PERMISSION_BEANS);
    }
}
